using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class PSMStat : GeneratedMessageLite<PSMStat, PSMStat.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<PSMStat, PSMStat.Builder>
		{
			private bool resultIsReadOnly;
			private PSMStat result;
			protected override PSMStat.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override PSMStat MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override PSMStat DefaultInstanceForType
			{
				get
				{
					return PSMStat.DefaultInstance;
				}
			}
			public uint MType
			{
				get
				{
					return this.result.MType;
				}
				set
				{
					this.SetMType(value);
				}
			}
			public string AType
			{
				get
				{
					return this.result.AType;
				}
				set
				{
					this.SetAType(value);
				}
			}
			public Builder()
			{
				this.result = PSMStat.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(PSMStat cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private PSMStat PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					PSMStat other = this.result;
					this.result = new PSMStat();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override PSMStat.Builder Clear()
			{
				this.result = PSMStat.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override PSMStat.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new PSMStat.Builder(this.result);
				}
				return new PSMStat.Builder().MergeFrom(this.result);
			}
			public override PSMStat BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override PSMStat.Builder MergeFrom(IMessageLite other)
			{
				if (other is PSMStat)
				{
					return this.MergeFrom((PSMStat)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override PSMStat.Builder MergeFrom(PSMStat other)
			{
				return this;
			}
			public override PSMStat.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override PSMStat.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(PSMStat._pSMStatFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = PSMStat._pSMStatFieldTags[num2];
					}
					uint num3 = num;
					if (num3 == 0u)
					{
						throw InvalidProtocolBufferException.InvalidTag();
					}
					if (num3 != 8u)
					{
						if (num3 != 18u)
						{
							if (WireFormat.IsEndGroupTag(num))
							{
								return this;
							}
							this.ParseUnknownField(input, extensionRegistry, num, text);
						}
						else
						{
							this.result.hasAType = input.ReadString(ref this.result.aType_);
						}
					}
					else
					{
						this.result.hasMType = input.ReadUInt32(ref this.result.mType_);
					}
				}
				return this;
			}
			public PSMStat.Builder SetMType(uint value)
			{
				this.PrepareBuilder();
				this.result.hasMType = true;
				this.result.mType_ = value;
				return this;
			}
			public PSMStat.Builder ClearMType()
			{
				this.PrepareBuilder();
				this.result.hasMType = false;
				this.result.mType_ = 0u;
				return this;
			}
			public PSMStat.Builder SetAType(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasAType = true;
				this.result.aType_ = value;
				return this;
			}
			public PSMStat.Builder ClearAType()
			{
				this.PrepareBuilder();
				this.result.hasAType = false;
				this.result.aType_ = "";
				return this;
			}
		}
		public const int MTypeFieldNumber = 1;
		public const int ATypeFieldNumber = 2;
		private static readonly PSMStat defaultInstance;
		private static readonly string[] _pSMStatFieldNames;
		private static readonly uint[] _pSMStatFieldTags;
		private bool hasMType;
		private uint mType_;
		private bool hasAType;
		private string aType_ = "";
		private int memoizedSerializedSize = -1;
		public static PSMStat DefaultInstance
		{
			get
			{
				return PSMStat.defaultInstance;
			}
		}
		public override PSMStat DefaultInstanceForType
		{
			get
			{
				return PSMStat.DefaultInstance;
			}
		}
		protected override PSMStat ThisMessage
		{
			get
			{
				return this;
			}
		}
		public uint MType
		{
			get
			{
				return this.mType_;
			}
		}
		public string AType
		{
			get
			{
				return this.aType_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasMType;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasMType)
				{
					num += CodedOutputStream.ComputeUInt32Size(1, this.MType);
				}
				if (this.hasAType)
				{
					num += CodedOutputStream.ComputeStringSize(2, this.AType);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private PSMStat()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] pSMStatFieldNames = PSMStat._pSMStatFieldNames;
			if (this.hasMType)
			{
				output.WriteUInt32(1, pSMStatFieldNames[1], this.MType);
			}
			if (this.hasAType)
			{
				output.WriteString(2, pSMStatFieldNames[0], this.AType);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasMType)
			{
				num ^= this.mType_.GetHashCode();
			}
			if (this.hasAType)
			{
				num ^= this.aType_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object value)
		{
			PSMStat pSMStat = value as PSMStat;
			return pSMStat != null && (this.hasMType == pSMStat.hasMType && (!this.hasMType || this.mType_.Equals(pSMStat.mType_))) && (this.hasAType == pSMStat.hasAType && (!this.hasAType || this.aType_.Equals(pSMStat.aType_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<PSMStat, PSMStat.Builder>.PrintField("MType", this.hasMType, this.mType_, writer);
			GeneratedMessageLite<PSMStat, PSMStat.Builder>.PrintField("AType", this.hasAType, this.aType_, writer);
		}
		public static PSMStat ParseFrom(byte[] data)
		{
			return PSMStat.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private PSMStat MakeReadOnly()
		{
			return this;
		}
		public static PSMStat.Builder CreateBuilder()
		{
			return new PSMStat.Builder();
		}
		public override PSMStat.Builder ToBuilder()
		{
			return PSMStat.CreateBuilder(this);
		}
		public override PSMStat.Builder CreateBuilderForType()
		{
			return new PSMStat.Builder();
		}
		public static PSMStat.Builder CreateBuilder(PSMStat prototype)
		{
			return new PSMStat.Builder(prototype);
		}
		static PSMStat()
		{
			PSMStat.defaultInstance = new PSMStat().MakeReadOnly();
			PSMStat._pSMStatFieldNames = new string[]
			{
				"AType",
				"MType"
			};
			PSMStat._pSMStatFieldTags = new uint[]
			{
				18u,
				8u
			};
			object.ReferenceEquals(micromsg.Proto.PSMStat.Descriptor, null);
		}
	}
}
